package com.cxf.windex.rest.admin;

import com.cxf.windex.base.rest.BaseRestController;
import com.cxf.windex.base.vo.MenuTree;
import com.cxf.windex.biz.WeiMenuBiz;
import com.cxf.windex.entity.WeiMenu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;

/**
 * @program: business_needs
 * @description: 菜单类
 * @author: chenxf
 * @create: 2018-10-09 10:53
 **/
@Api(tags = {"村广通[后台] - 菜单接口"})
@Controller
@RequestMapping("admin/menu")
public class WeiMenuController
        extends BaseRestController<WeiMenuBiz, WeiMenu> {
    @ApiOperation(value = "查询菜单 ", notes = "查询菜单 ")
    @RequestMapping(value = "/initMenu", method = RequestMethod.GET)
    @ResponseBody
    public List<MenuTree> menu() {
        this.getCurrentUserId();
        String type = this.getCurrentUserType();
        return baseBiz.getMenu(type);
    }



}
